package com.itheima.a01polymorphismdemo1;

public class Test {
    public static void main(String[] args) {
        Student s = new Student("小明", 18);
        Teacher t = new Teacher();
        t.setName("小红");
        t.setAge(19);
        Administrator a = new Administrator();
        a.setName("小刚");
        a.setAge(20);
        show(s);
        show(t);
        show(a);
    }

    public static void show(Person p) {
        p.show();
    }
}
